<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>响应式-小满</title>
</head>
<body>
    <div id="app"></div>
    <script type="module">
        import { reactive } from './reactive.js'
        import { effect } from './effect.js'
        const data = reactive({
            text: 'hello zhen'
        })
        effect(() => {
            document.querySelector('#app').innerHTML = data.text
        })
        setTimeout(() => {
            data.text = 'hello man'
        }, 2000)
    </script>
</body>

</html>